const mongoose = require('mongoose')

const Good = new mongoose.Schema({
  // 中文标题
  zhTitle: {
    type: String,
    required: true
  },
  // 英文标题
  enTitle: {
    type: String,
    required: true
  },
  // 人名币
  zhPrice: {
    type: Number,
    required: true
  },
  // 美元
  enPrice: {
    type: Number,
    required: true
  },
  // 图片  商品详情中的小图
  img: {
    type: [String],
    required: true
  },
  // 中文描述
  zhDescription: {
    type: String,
    required: true
  },
  // 英文描述
  enDescription: {
    type: String,
    required: true
  },
  // 库存
  inventory: {
    type: Number,
    min: 0,
    required: true
  },
  big_img: {
    type: String,
    required: true
  }
})

module.exports = mongoose.model('goods', Good)
